home *** CD-ROM | disk | FTP | other *** search
/ JCSM Shareware Collection 1996 September / JCSM Shareware Collection (JCS Distribution) (September 1996).ISO / butility / get26.zip / SHELLS.DOC < prev   
Text File  |  1992-02-25  |  2KB  |  38 lines

  1.                Out of Environment Space?
  2.  
  3.    When running a BATch file from a "shell" there may be problems with 
  4. "Out of Environment space" since DOS does not usually allocate excess 
  5. Environment space to child processes.  4DOS and its alter-ego NDOS 
  6. provide a means to ensure that copies of the Environment have 
  7. sufficient space available, but COMMAND.COM is very stingy with the 
  8. amount of free Environment space it allocates to child processes.  
  9. Check the documentation for your shell program to see if it can make 
  10. sufficient Environment space available.  If you plan on running a 
  11. BATch file from a shell and find that "Out of environment space" is a 
  12. problem, there are several things that you can try to do.
  13.  
  14.   If COMMAND.COM is your command processor, in order to run your.bat 
  15. you can tell your shell to use the command, C:\COMMAND.COM /E:512 / 
  16. Cyour.bat.  Assuming that COMMAND.COM is in the root directory of the 
  17. C: drive, this will allocate 512 bytes of Environment space to your 
  18. BATch file.  Just adjust the command for the proper location of your 
  19. COMMAND.COM and the actual amount of Environment space you will need 
  20. with the /E: switch.
  21.  
  22.   If your shell won't cooperate in running COMMAND.COM in this manner, 
  23. then you can establish a BATch file to do it for you.  Call it 
  24. RUNBATCH.BAT and make the first line %COMSPEC% /E:512 /C%1 %2 %3 etc.  
  25. Then when you want to run your.bat, tell your shell to execute the 
  26. command RUNBATCH your.bat.  Follow that with any parameters you need 
  27. for your.bat and they will be picked up by the %1 %2 %3 etc. 
  28. replaceable parameters in RUNBATCH.BAT.
  29.  
  30.   Another method to ensure that GET has enough Environment space to 
  31. store its results is to establish a dummy GET variable before loading 
  32. any shells or other programs.  The best way would be to do it in your 
  33. AUTOEXEC.BAT.  Simply insert the command SET GET=xxxxx...xxxx in your 
  34. AUTOEXEC.BAT file with enough x's or other characters for the maximum 
  35. length input string you are expecting. Then in any BATch file that is 
  36. to be run from the shell, before using GET issue the command SET 
  37. GET=.  This will remove the GET variable from the Environment and 
  38. free the space to be reused by GET.